package com.spring.boot.mvc.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 普调的接口，不会触发视图解析器
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    /**
     * http://localhost:8081/common/hello
     * @return
     */
    @GetMapping(value = "/hello")
    public Map<String, Object> hello(){
        Map<String, Object> map = new HashMap<>();
        map.put("hello", "hello");
        return map;
    }

}
